{% extends "system/index.html"%} 
{%block subsectionid%}system-services{%endblock%}
{% block content%}
<fieldset>
    <legend>Services</legend>
    <table>
        <th>Service</th>
        <th colspan="2">Status</th>
        <th colspan="2">Enabled at boot</th>
       {% for service,service_running,service_enabled in services%}
          <tr>
              <form method="post" action="{%url system-services%}">
                <input type="hidden" value="{{service}}" name="service"></input>
                <td>{{service}}</td>
                {% if service_running %}
                    <td>Running</td><td><input name="stop" type="submit" value="stop"></input><input name="restart" type="submit" value="restart"></input></td>
                {% else%}
                <td>Not running</td><td><input name="start" type="submit" value="start"></input></input></td>
                {% endif %}
                {% if service_enabled %}
                <td>Yes</td>
                <td>
                    <input name="disable" type="submit" value="disable"></input>
                </td>
                {% else %}
                <td>no</td>
                <td>
                    <input name="enable" type="submit" value="enable"></input>
                </td>
                {% endif %}
            </form>
          </tr>
       {% endfor %}
    </table>
</fieldset>
{% endblock %}
